<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html lang="en">
<head>
<base href="<%=basePath%>">
<!-- 下拉框 -->
<link rel="stylesheet" href="static/ace/css/chosen.css" />
<!-- 日期框 -->
<link rel="stylesheet" href="static/ace/css/datepicker.css" />
<!-- jsp文件头和头部 -->
<%@ include file="../index/top.jsp"%>
</head>
<body class="no-skin">
	<!-- /section:basics/navbar.layout -->
	<div class="main-container" id="main-container">
		<!-- /section:basics/sidebar -->
		<div class="main-content">
			<div class="main-content-inner">
				<div class="page-content">
					<div class="row">
						<div class="col-xs-12">
							<form action="doctor/${action}.do" name="additionForm"
								id="additionForm" method="post">
								<input type="hidden" name="TID" id="tid"
									value="${item.TID}" /> 
								<div id="zhongxin" style="padding-top: 13px;">
									<table id="table_report"
										class="table table-striped table-bordered table-hover">

										<tr>
											<td
												style="width: 90px; text-align: right; padding-top: 13px;">医院名称:</td>
											<td>${item.HOSPITALNAME }</td>
										</tr>
										<tr>
											<td
												style="width: 90px; text-align: right; padding-top: 13px;">科室:</td>
											<td>${item.CATEGORYNAME}</td>
										</tr>
										<tr>
											<td
												style="width: 90px; text-align: right; padding-top: 13px;">贵宾约普通会员价格:</td>
											<td><input type="number" name="PRICE" id="price"
												value="${item.PRICE}" placeholder="输入贵宾约普通会员价格"
												title="贵宾约普通会员价格" style="width: 98%;" /></td>
										</tr>
										<tr>
											<td
												style="width: 90px; text-align: right; padding-top: 13px;">贵宾约VIP价格:</td>
											<td><input type="number" name="VIPPRICE" id="vipprice"
												value="${item.VIPPRICE}" placeholder="输入贵宾约VIP价格"
												title="贵宾约VIP价格" style="width: 98%;" /></td>
										</tr>
										<tr>
											<td
												style="width: 90px; text-align: right; padding-top: 13px;">团体约普通会员价格:</td>
											<td><input type="number" name="GROUPPRICE"
												id="groupprice" value="${item.GROUPPRICE}"
												placeholder="团体约普通会员价格" title="输入团体约普通会员价格" style="width: 98%;" /></td>
										</tr>
										<tr>
											<td
												style="width: 90px; text-align: right; padding-top: 13px;">团体约VIP价格:</td>
											<td><input type="number" name="GROUPVIPPRICE"
												id="groupvipprice" value="${item.GROUPVIPPRICE}"
												placeholder="团体约VIP价格" title="输入团体约VIP价格" style="width: 98%;" /></td>
										</tr>
										<tr>
											<td
												style="width: 90px; text-align: right; padding-top: 13px;">失效时间:</td>
											<td><input class="span10 date-picker" name="EXPIREDATE" id="EXPIREDATE" value="${item.EXPIREDATE}" type="text" data-date-format="yyyy-mm-dd" placeholder="失效日期"  title="失效日期" readonly="readonly" style="width:98%;" /></td>
										</tr>
										
										
										<tr>
											<td style="text-align: center;" colspan="10"><a
												class="btn btn-mini btn-primary" onclick="save();">保存</a> <a
												class="btn btn-mini btn-danger"
												onclick="top.Dialog.close();">取消</a></td>
										</tr>
									</table>
								</div>
								<div id="zhongxin2" class="center" style="display: none">
									<br /> <br /> <br /> <br /> <img
										src="static/images/jiazai.gif" /><br />
									<h4 class="lighter block green"></h4>
								</div>
							</form>
						</div>
						<!-- /.col -->
					</div>
					<!-- /.row -->
				</div>
				<!-- /.page-content -->
			</div>
		</div>
		<!-- /.main-content -->
	</div>
	<!-- /.main-container -->
	<!-- basic scripts -->
	<!-- 页面底部js¨ -->
	<%@ include file="../index/foot.jsp"%>
	<!-- ace scripts -->
	<script src="static/ace/js/ace/ace.js"></script>
	<!-- inline scripts related to this page -->
	<!-- 日期框 -->
	<script src="static/ace/js/date-time/bootstrap-datepicker.js"></script>
	<!-- 下拉框 -->
	<script src="static/ace/js/chosen.jquery.js"></script>
	<!--提示框-->
	<script type="text/javascript" src="static/js/jquery.tips.js"></script>
</body>
<script type="text/javascript">
	$(top.hangge());

	//保存
	function save() {

		if ($("#price").val() == "") {
			$("#price").tips({
				side : 3,
				msg : '输入贵宾约普通会员价',
				bg : '#AE81FF',
				time : 2
			});
			$("#price").focus();
			$("#price").val('');
			$("#price").css("background-color", "white");
			return false;
		} else {
			$("#price").val(jQuery.trim($('#price').val()));
		}

		if ($("#vipprice").val() == "") {
			$("#vipprice").tips({
				side : 3,
				msg : '请输入贵宾约VIP价格',
				bg : '#AE81FF',
				time : 3
			});
			$("#vipprice").focus();
			return false;
		} else {
			$("#vipprice").val($.trim($("#vipprice").val()));
		}

		if ($("#groupprice").val() == "") {
			$("#groupprice").tips({
				side : 3,
				msg : '请输入团体约普通会员价格',
				bg : '#AE81FF',
				time : 3
			});
			$("#groupprice").focus();
			return false;
		}else {
			$("#groupprice").val($.trim($("#groupprice").val()));
		}
		
		if ($("#grouvippprice").val() == "") {
			$("#groupvipprice").tips({
				side : 3,
				msg : '请输入团体约VIP会员价格',
				bg : '#AE81FF',
				time : 3
			});
			$("#groupvipprice").focus();
			return false;
		}else {
			$("#groupvipprice").val($.trim($("#groupvipprice").val()));
		}

		
		if ($("#EXPIREDATE").val() == "") {
			$("#EXPIREDATE").tips({
				side : 3,
				msg : '请输入失效日期',
				bg : '#AE81FF',
				time : 3
			});
			$("#EXPIREDATE").focus();
			return false;
		}
		

		$("#additionForm").submit();
		$("#zhongxin").hide();
		$("#zhongxin2").show();

	}


	$(function() {
		//日期框
		$('.date-picker').datepicker({autoclose: true,todayHighlight: true});
		
		//下拉框
		if (!ace.vars['touch']) {
			$('.chosen-select').chosen({
				allow_single_deselect : true
			});
			$(window).off('resize.chosen').on('resize.chosen', function() {
				$('.chosen-select').each(function() {
					var $this = $(this);
					$this.next().css({
						'width' : $this.parent().width()
					});
				});
			}).trigger('resize.chosen');
			$(document).on('settings.ace.chosen',
					function(e, event_name, event_val) {
						if (event_name != 'sidebar_collapsed')
							return;
						$('.chosen-select').each(function() {
							var $this = $(this);
							$this.next().css({
								'width' : $this.parent().width()
							});
						});
					});
			$('#chosen-multiple-style .btn').on('click', function(e) {
				var target = $(this).find('input[type=radio]');
				var which = parseInt(target.val());
				if (which == 2)
					$('#form-field-select-4').addClass('tag-input-style');
				else
					$('#form-field-select-4').removeClass('tag-input-style');
			});
		}

		

		

	});
</script>
</html>